/**
 * 回文数
 *
 * @author lenovo
 * @version 1.0
 * @date 2023/6/10 11:01
 */

public class Test3 {
    public static void palindrome(int num) {
        int renum = 0;
        int ten = 10;
        for (int i = num, j = 0; i > 0; i /= ten) {
            int t = num / (int) Math.pow(10, j++) % 10;
            renum *= 10;
            renum += t;
        }
        System.out.println(num - renum == 0 ? "是回文数" : "不是");
    }

    public static void main(String[] args) {
        palindrome(12345);
    }

}

